package com.miyake.client;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.miyake.client.datamanage.Alias;
import com.miyake.client.datamanage.AnalysisSetup;
import com.miyake.client.datamanage.Data;
import com.miyake.client.datamanage.NodeProperty;
import com.miyake.client.datamanage.Paper;
import com.miyake.client.datamanage.PlotData;
import com.miyake.client.datamanage.PlotSetting;
import com.miyake.client.datamanage.Table;
import com.miyake.client.datamanage.Text;
import com.miyake.client.datamanage.plugin.PluginProperty;

public interface DataServiceAsync {

	void getRootNodes(String userKey, AsyncCallback<List<NodeProperty>> callback);
	void getSubNodes(String key, AsyncCallback<List<NodeProperty>> callback);
	void createRootNode(String name, AsyncCallback<String> callback);
	void renameRootNode(String key, String name, AsyncCallback<Void> callback);
	void createNode(String name, String parentKey,
			AsyncCallback<String> callback);
	void renameNode(String key, String name, AsyncCallback<Void> callback);
	void createPlot(String name, String parentKey, Integer xcol, Integer ycol,
			AsyncCallback<String> callback);
	void deleteNode(String key, AsyncCallback<Void> callback);
	void getData(String key, AsyncCallback<Data> callback);
	void getPlot(String nodeKey, Integer count, AsyncCallback<PlotData> callback);
	void getPlotURL(String nodeKey, Integer count, Integer height, AsyncCallback<String> callback);
	void updatePlot(String nodeKey, PlotSetting scale,
			AsyncCallback<Void> callback);
	void createText(String name, String parentKey, Text data, Integer order,
			AsyncCallback<String> callback);
	void getText(String key, AsyncCallback<Text> callback);
	void updateText(String nodeKey, Text data, AsyncCallback<Void> callback);
	void getNode(String key, AsyncCallback<NodeProperty> callback);
	void moveNodeUp(String key, AsyncCallback<Void> callback);
	void moveNodeDown(String key, AsyncCallback<Void> callback);
	void createTable(String name, String parentKey,
			AsyncCallback<String> callback);
	void getTable(String nodeKey, AsyncCallback<Table> callback);
	void getImage(String nodeKey, AsyncCallback<String> callback);
	void createPaper(String name, String parentKey, AsyncCallback<String> callback);
	void getPaper(String nodeKey, AsyncCallback<Paper> callback);
	void getPlotList(String nodeKey, AsyncCallback<List<NodeProperty>> callback);
	void createAlias(String parentKey, String key, Integer type,
			AsyncCallback<String> callback);
	void getAlias(String nodeKey, AsyncCallback<Alias> callback);
	void getImageList(String nodeKey, AsyncCallback<List<NodeProperty>> callback);
	void getPaperList(String communityKey,
			AsyncCallback<List<Paper>> callback);
	void updateData(String nodeKey, Data data, AsyncCallback<Void> callback);
	void setSecurityLevel(String nodeKey, Integer level,
			AsyncCallback<Void> callback);
	void getOpenDataList(String userKey,
			AsyncCallback<List<NodeProperty>> callback);
	void doAnalysis(String nodeKey, String pluginKey, AnalysisSetup setup,
			Integer column, AsyncCallback<String> callback);
	void getAnalysisParameters(String url, AsyncCallback<AnalysisSetup> callback);
	void addFilePlugin(String url, AsyncCallback<String> callback);
	void addAnalysisPlugin(String url, AsyncCallback<String> callback);
	void getFilePluginList(AsyncCallback<List<PluginProperty>> callback);
	void getAnalysisPluginList(AsyncCallback<List<PluginProperty>> callback);
	void deletePlugin(String key, AsyncCallback<Void> callback);
	void setFilePlugin(String nodeKey, String pluginKey,
			AsyncCallback<Void> callback);
	void getPlugin(String key, AsyncCallback<PluginProperty> callback);
	void doParse(String nodeKey, AsyncCallback<Void> callback);
	void deleteNodes(List<String> keys, AsyncCallback<Void> callback);
	void addChartPlugin(String url, AsyncCallback<String> callback);
	void getChartPluginList(AsyncCallback<List<PluginProperty>> callback);
	void addPlotOverlay(String nodeKey, String overlayNodeKey,
			AsyncCallback<String> callback);
	void getSpecifiedSubNodes(String key, Integer type,
			AsyncCallback<List<NodeProperty>> callback);
	void deletePlotOverLay(String nodeKey, String overlayNodeKey,
			AsyncCallback<Void> callback);
	void getRootNode(String subNode, AsyncCallback<NodeProperty> callback);
	void setAnalysisPlugin(String nodeKey, String pluginKey,
			AsyncCallback<Void> callback);
	void getMyAnalysisParameters(String nodeKey, String url,
			AsyncCallback<AnalysisSetup> callback);
	void doReAnalysis(String nodeKey, String pluginKey, AnalysisSetup setup,
			AsyncCallback<String> callback);
}
